/*
 * Copyright © 2024-2025 Wenze Wei
 *
 * This file is part of StadionOS.
 *
 * This Source Code Form is subject to the terms of the GNU General Public License, v. 2.0.
 * You can obtain a copy of the GPL at
 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 */

#ifndef LIBS_STRING_H
#define LIBS_STRING_H

#include <string.h>  
#include <stdint.h>  
#include <stddef.h> 

void     *Smemchr(const void *str, int c, size_t n);
int       Smemcmp(const void *str1, const void *str2, size_t n);
void     *Smemcpy(void *dest, const void *src, size_t n);
void     *Smemmove(void *dest, const void *src, size_t n);
void     *Smemset(void *str, int c, size_t n);
char     *Sstrcat(char *dest, const char *src);
char     *Sstrncat(char *dest, const char *src, size_t n);
char     *Sstrchr(const char *str, int c);
int       Sstrcmp(const char *str1, const char *str2);
int       Sstrncmp(const char *str1, const char *str2, size_t n);
int       Sstrcoll(const char *str1, const char *str2);
char     *Sstrcpy(char *dest, const char *src);
char     *Sstrncpy(char *dest, const char *src, size_t n);
size_t    Sstrcspn(const char *str1, const char *str2);
char     *Sstrerror(int errnum);
size_t    Sstrlen(const char *str);
char     *Sstrpbrk(const char *str1, const char *str2);
char     *Sstrrchr(const char *str, int c);
size_t    Sstrspn(const char *str1, const char *str2);
char     *Sstrstr(const char *haystack, const char *needle);
char     *Sstrtok(char *str, const char *delim);
size_t    Sstrxfrm(char *dest, const char *src, size_t n);

int       Sisalnum(int c);
int       Sisalpha(int c);
int       Siscntrl(int c);
int       Sisdigit(int c);
int       Sisgraph(int c);
int       Sislower(int c);
int       Sisprint(int c);
int       Sispunct(int c);
int       Sisspace(int c);
int       Sisupper(int c);
int       Sisxdigit(int c);
int       Stolower(int c);
int       Stoupper(int c);

#endif //LIBS_STRING_H
